package net.ericaro.neojavagen.blocks;

/**
 * <b>EnhancedForStatement</b> ::= "for" "(" <{@link net .ericaro .neojavagen .classes .VariableModifiers VariableModifiers}>? <
 * {@link net .ericaro .neojavagen .types .Type Type}> <{@link net .ericaro .neojavagen .types .Identifier Identifier}> ":" <
 * {@link net .ericaro .neojavagen .expressions .Expression Expression}> ")" <{@link net .ericaro .neojavagen .blocks .Statement Statement}>
 * 
 * @author eric@ericaro.net
 */
public class EnhancedForStatement extends net.ericaro.neojavagen.JavaPartComposition implements net.ericaro.neojavagen.blocks.ForStatement {
	private net.ericaro.neojavagen.expressions.Expression expression;

	private net.ericaro.neojavagen.types.Identifier identifier;

	private net.ericaro.neojavagen.blocks.Statement statement;

	private net.ericaro.neojavagen.types.Type type;

	private net.ericaro.neojavagen.classes.VariableModifiers variableModifiers;

	public EnhancedForStatement(net.ericaro.neojavagen.classes.VariableModifiers variableModifiers, net.ericaro.neojavagen.types.Type type, net.ericaro.neojavagen.types.Identifier identifier, net.ericaro.neojavagen.expressions.Expression expression, net.ericaro.neojavagen.blocks.Statement statement) {
		super();
		this.variableModifiers = variableModifiers;
		this.type = type;
		this.identifier = identifier;
		this.expression = expression;
		this.statement = statement;
	}

	public EnhancedForStatement(net.ericaro.neojavagen.types.Type type, net.ericaro.neojavagen.types.Identifier identifier, net.ericaro.neojavagen.expressions.Expression expression, net.ericaro.neojavagen.blocks.Statement statement) {
		this.variableModifiers = null;
		this.type = type;
		this.identifier = identifier;
		this.expression = expression;
		this.statement = statement;
	}

	public net.ericaro.neojavagen.expressions.Expression getExpression() {
		return expression;
	}

	public net.ericaro.neojavagen.types.Identifier getIdentifier() {
		return identifier;
	}

	public net.ericaro.neojavagen.blocks.Statement getStatement() {
		return statement;
	}

	public net.ericaro.neojavagen.types.Type getType() {
		return type;
	}

	public net.ericaro.neojavagen.classes.VariableModifiers getVariableModifiers() {
		return variableModifiers;
	}

	public void setExpression(net.ericaro.neojavagen.expressions.Expression expression) {
		this.expression = expression;
	}

	public void setIdentifier(net.ericaro.neojavagen.types.Identifier identifier) {
		this.identifier = identifier;
	}

	public void setStatement(net.ericaro.neojavagen.blocks.Statement statement) {
		this.statement = statement;
	}

	public void setType(net.ericaro.neojavagen.types.Type type) {
		this.type = type;
	}

	public void setVariableModifiers(net.ericaro.neojavagen.classes.VariableModifiers variableModifiers) {
		this.variableModifiers = variableModifiers;
	}

	@Override
	public java.lang.String toString() {
		return print("for", "(", variableModifiers, type, identifier, ":", expression, ")", statement);
	}
}
